#!/usr/bin/python

on = {
   "e111|e|": "r1",
   "e112|22|e|": "r1*r2",
   "e123|e23|33||": "r1*r3",
   "e112|33|e33||": "r1*r4",
   "e112|e3|333||": "r1**2",
   "e112|23|33|e|": "r1*r3",
   "e123|234|34|4|e|": "r1*r3",
   "e112|33|e44|44||": "r1*r7",
   "e123|e23|44|44||": "r1*r5",
   "e112|23|e4|444||": "r1**2*r2",
   "e112|34|334|4|e|": "r1*r6",
   "e112|23|34|44|e|": "r1*r6",
   "e112|34|e34|44||": "r1*r5",
   "e112|33|444|e4||": "r1**2*r2",
   "e112|e3|344|44||": "r1**2*r2",
   "e112|23|44|e44||": "r1*r5",
   "e123|e24|34|44||": "r1*r6",
   "e112|23|34|45|55|e|": "r1*r10",
   "e112|34|355|45|e5||": "r1*r10",
   "e123|e23|34|5|555||": "r1**2*r3",
   "e123|e23|44|55|55||": "r1*r9",
   "e112|23|34|e5|555||": "r1**2*r3",
   "e123|e24|34|55|55||": "r1*r13",
   "e123|e45|334|5|55||": "r1*r11",
   "e112|33|e44|55|55||": "r1*r15",
   "e123|245|45|445||e|": "r1*r2*r3",
   "e123|e45|444|555|||": "r1**3",
   "e112|34|e33|5|555||": "r1**2*r4",
   "e112|34|e34|55|55||": "r1*r14",
   "e112|34|345|45|5|e|": "r1*r2*r3",
   "e112|34|334|5|55|e|": "r1*r10",
   "e112|e3|444|555|5||": "r1**3",
   "e123|e24|55|445|5||": "r1*r11",
   "e112|23|45|445|5|e|": "r1*r10",
   "e123|234|45|45|5|e|": "r1*r8",
   "e112|23|44|555|e5||": "r1**2*r3",
   "e123|224|5|445|5|e|": "r1*r10",
   "e112|e3|345|45|55||": "r1**2*r3",
   "e112|33|445|45|5|e|": "r1*r13",
   "e123|e45|345|45|5||": "r1*r2*r3",
   "e112|34|345|e5|55||": "r1*r10",
   "e112|23|44|e55|55||": "r1*r9",
   "e123|e23|45|45|55||": "r1*r11",
   "e112|34|335|e|555||": "r1**2*r3",
   "e112|23|34|55|e55||": "r1*r13",
   "e123|e45|445|455|||": "r1*r10",
   "e123|234|45|55|e5||": "r1*r2*r3",
   "e112|33|445|e5|55||": "r1**2*r2**2",
   "e112|34|e35|45|55||": "r1*r13",
   "e112|23|45|e45|55||": "r1*r11",
   "e112|33|e34|5|555||": "r1**2*r4",
   "e123|e24|33|5|555||": "r1**2*r3",
   "e112|23|e4|455|55||": "r1**2*r2**2",
   "e112|33|e45|45|55||": "r1*r9",
   "e112|e3|445|455|5||": "r1**2*r3",
   "e123|e24|35|45|55||": "r1*r10",
   "e112|34|355|e4|55||": "r1*r13",
   "e123|e45|344|55|5||": "r1*r12",
   "e112|34|e55|445|5||": "r1*r9",
   "e112|33|444|55|5|e|": "r1**2*r4",
   "e123|224|4|555|e5||": "r1**2*r3",
   "e112|33|344|5|55|e|": "r1*r14",
   "e112|e3|334|5|555||": "r1**3",
   "e112|23|44|455|5|e|": "r1*r11",
   "e112|34|335|4|55|e|": "r1*r12",
   "e112|34|335|5|e55||": "r1*r11",
   "e112|e3|344|55|55||": "r1**2*r4",
   "ee11|ee|": "r2",
   "ee12|e22|e|": "r3",
   "e112|e3|e33|e|": "r6",
   "ee12|e23|33|e|": "r6",
   "ee12|223|3|ee|": "r5",
   "ee12|e33|e33||": "r5",
   "ee12|ee3|333||": "r1*r2",
   "e123|e23|e3|e|": "r3",
   "ee12|e23|44|e44||": "r13",
   "ee12|233|44|e4|e|": "r12",
   "ee12|233|34|4|ee|": "r13",
   "ee12|e34|334|4|e|": "r10",
   "ee12|334|344|e|e|": "r10",
   "ee12|234|34|e4|e|": "r2*r3",
   "ee12|e34|e34|44||": "r11",
   "e112|e3|e34|44|e|": "r10",
   "ee12|e23|34|44|e|": "r10",
   "ee12|e33|e44|44||": "r9",
   "ee12|334|334||ee|": "r14",
   "ee12|223|4|e44|e|": "r11",
   "ee12|ee3|344|44||": "r1*r2**2",
   "ee12|e23|e4|444||": "r1*r3",
   "ee12|e33|444|e4||": "r1*r3",
   "e112|34|e34|e4|e|": "r2*r3",
   "e112|e3|e44|e44||": "r13",
   "ee12|e33|344|4|e|": "r11",
   "e123|e24|34|e4|e|": "r8",
   "ee12|e33|344|5|55|e|": "r26",
   "e123|e24|e5|e45|55||": "r3**2",
   "e112|e3|e44|555|e5||": "r1*r6",
   "ee12|233|44|45|5|ee|": "r30",
   "e123|e45|e45|445||e|": "r17",
   "ee12|234|35|ee|555||": "r1*r5",
   "ee12|334|345|e|55|e|": "r20",
   "ee12|e34|555|e44|5||": "r1*r6",
   "ee12|e34|335|e|555||": "r1*r6",
   "e112|34|e35|45|e5|e|": "r18",
   "ee12|e33|445|e5|55||": "r1*r2*r3",
   "ee12|234|34|e5|55|e|": "r22",
   "ee12|e33|e44|55|55||": "r32",
   "ee12|e23|34|55|e55||": "r25",
   "ee12|333|444|5|5|ee|": "r1**2*r2",
   "ee12|334|355|5|ee5||": "r26",
   "ee12|e23|44|e55|55||": "r28",
   "ee12|233|34|5|e55|e|": "r24",
   "ee12|234|35|e4|55|e|": "r19",
   "ee12|e33|445|55|e5||": "r27",
   "e112|23|45|e45|e5|e|": "r3**2",
   "ee12|333|445|5|e5|e|": "r1*r6",
   "ee12|334|335||e55|e|": "r26",
   "ee12|334|455|55|ee||": "r29",
   "ee12|e23|34|e5|555||": "r1*r6",
   "e112|e3|334|5|e55|e|": "r21",
   "ee12|233|45|45|e5|e|": "r22",
   "e112|33|e44|e5|55|e|": "r31",
   "ee12|234|35|45|e5|e|": "r18",
   "ee12|e33|444|55|5|e|": "r1*r5",
   "e112|e3|e44|455|5|e|": "r24",
   "e112|e3|e34|e5|555||": "r1*r6",
   "ee12|e34|335|4|55|e|": "r23",
   "e112|e3|e44|e55|55||": "r28",
   "ee12|e23|44|455|5|e|": "r24",
   "e112|e3|344|55|e5|e|": "r23",
   "ee12|e34|345|e5|55||": "r20",
   "ee12|223|4|ee5|555||": "r1*r5",
   "ee12|e34|335|5|e55||": "r24",
   "e112|33|e45|45|e5|e|": "r3*r4",
   "ee12|ee3|444|555|5||": "r1**2*r2",
   "ee12|e34|e35|45|55||": "r24",
   "e123|e24|35|45|e5|e|": "r16",
   "ee12|e33|445|45|5|e|": "r24",
   "ee12|ee3|445|455|5||": "r1*r2*r3",
   "e112|23|e4|455|e5|e|": "r20",
   "ee12|334|344|5|5|ee|": "r25",
   "ee12|e34|355|45|e5||": "r20",
   "ee12|345|345|ee|55||": "r26",
   "ee12|334|455|e4|5|e|": "r21",
   "ee12|e33|e34|5|555||": "r1*r5",
   "ee12|334|355|e|e55||": "r25",
   "e123|e23|45|45|e5|e|": "r2*r3",
   "ee12|e33|345|4|55|e|": "r24",
   "e112|e3|e45|445|5|e|": "r20",
   "ee12|e23|e4|455|55||": "r1*r2*r3",
   "e112|34|e35|e5|e55||": "r19",
   "ee12|e23|34|45|55|e|": "r20",
   "ee12|334|345|5|e5|e|": "r19",
   "ee12|e34|e34|55|55||": "r26",
   "e112|e3|e34|55|e55||": "r25",
   "ee12|233|45|44|5|ee|": "r31",
   "e112|e3|345|45|e5|e|": "r3**2",
   "ee12|e23|44|555|e5||": "r1*r6",
   "e112|e3|e34|45|55|e|": "r20",
   "ee12|ee3|344|55|55||": "r1*r2*r4",
   "ee12|e34|355|44|5|e|": "r21",
   "ee12|234|35|44|5|ee|": "r25",
   "ee12|233|45|e4|55|e|": "r23",
   "ee12|e34|334|5|55|e|": "r20",
   "e112|23|e4|e55|e55||": "r25",
   "ee12|334|455|e5|e5||": "r20",
   "ee12|233|44|e5|55|e|": "r30",
   "e112|34|e35|e4|55|e|": "r22",
   "ee12|ee3|345|45|55||": "r1*r2*r3",
   "ee12|223|4|e45|55|e|": "r24",
   "ee12|e34|355|e4|55||": "r25",
   "e123|e24|55|e45|e5||": "r18",
   "e123|e45|e45|e45|5||": "r2*r3",
   "e112|34|e55|e45|e5||": "r22",
   "e112|e3|e45|e45|55||": "r24",
   "e112|34|345|e5|e5|e|": "r17",
   "ee12|e23|45|445|5|e|": "r20",
   "ee12|223|4|e55|e55||": "r26",
   "ee12|ee3|334|5|555||": "r1**2*r2",
   "ee12|e23|45|e45|55||": "r24",
   "e112|23|e4|e45|55|e|": "r20",
   "ee12|e33|e45|45|55||": "r27",
   "ee12|345|345|e4|5|e|": "r17",
   "ee12|223|4|445|5|ee|": "r27",
   "ee12|e34|345|45|5|e|": "r3**2",
   "ee12|334|355|4|e5|e|": "r23",
   "e112|34|e34|e5|55|e|": "r19",
   "e112|e3|445|455|e|e|": "r20",
   "ee12|234|34|45|5|ee|": "r3*r4",
   "e123|e23|e4|e5|555||": "r1*r3",
   "ee12|334|355|e|666|e6||": "r1*r10",
   "ee12|234|35|45|e6|66|e|": "r76",
   "ee12|e33|445|45|6|66|e|": "r58",
   "ee12|e33|e44|45|6|666||": "r1*r9",
   "e112|34|356|56|e56|e|e|": "r37",
   "ee12|233|34|5|ee6|666||": "r1*r13",
   "ee12|334|355|6|ee6|66||": "r67",
   "ee12|ee3|456|456|56|6||": "r1*r2*r3",
   "ee12|e34|335|5|e66|66||": "r68",
   "ee12|345|346|45|6|e6|e|": "r41",
   "ee12|334|456|e5|e6|66||": "r48",
   "ee12|e33|445|56|e6|66||": "r60",
   "ee12|333|445|6|56|e6|e|": "r1*r10",
   "ee12|334|455|e6|56|6|e|": "r78",
   "ee12|e33|445|e5|66|66||": "r1*r3*r4",
   "ee12|e34|356|45|56|6|e|": "r40",
   "ee12|334|335||e56|66|e|": "r86",
   "ee12|334|456|55|e6|6|e|": "r82",
   "ee12|223|4|455|66|e6|e|": "r62",
   "ee12|234|34|e5|56|66|e|": "r51",
   "ee12|e34|355|66|566|e||": "r84",
   "e112|33|e45|46|e5|66|e|": "r82",
   "ee12|e34|556|e66|556|||": "r86",
   "ee12|ee3|344|56|56|66||": "r1*r2*r5",
   "e112|e3|e44|556|66|e6||": "r68",
   "ee12|333|456|4|56|e6|e|": "r1*r2*r3",
   "ee12|334|556|45|e6|6|e|": "r54",
   "ee12|334|556|e6|e56|6||": "r48",
   "ee12|e33|344|5|56|66|e|": "r59",
   "ee12|345|345|ee|66|66||": "r67",
   "ee12|345|345|e6|56|6|e|": "r2**2*r3",
   "e112|e3|456|456|e5|6|e|": "r38",
   "ee12|334|345|6|ee|666||": "r1*r14",
   "ee12|e34|335|4|66|e66||": "r64",
   "ee12|234|35|46|e5|66|e|": "r44",
   "ee12|e34|355|45|66|6|e|": "r54",
   "ee12|334|345|e|e6|666||": "r1*r10",
   "ee12|e33|e34|5|566|66||": "r1*r2*r5",
   "ee12|233|44|55|56|6|ee|": "r87",
   "e112|34|e56|e45|66|e6||": "r76",
   "ee12|234|56|e56|e56|6||": "r2**2*r3",
   "ee12|e23|e4|555|666|6||": "r1**2*r3",
   "ee12|ee3|345|45|66|66||": "r1*r2*r5",
   "ee12|334|455|66|ee|66||": "r91",
   "e112|e3|445|446||e66|e|": "r84",
   "ee12|e34|556|e46|56|6||": "r48",
   "ee12|e34|335|4|e6|666||": "r1*r10",
   "e123|e23|e4|45|e6|666||": "r1*r2*r3",
   "e112|e3|445|466|5|e6|e|": "r54",
   "e112|e3|344|45|6|e66|e|": "r55",
   "e123|e24|e5|e46|56|66||": "r3*r6",
   "ee12|233|45|46|66|ee6||": "r65",
   "ee12|e23|45|e66|556|6||": "r68",
   "e112|34|556|e45|e6|6|e|": "r45",
   "ee12|e34|345|56|56|6|e|": "r38",
   "ee12|233|45|66|e56|e6||": "r63",
   "ee12|345|346|55|66|e|e|": "r48",
   "ee12|233|45|44|6|e66|e|": "r65",
   "e112|e3|e44|e45|6|666||": "r1*r13",
   "ee12|e33|445|56|66|e6||": "r65",
   "e112|33|e34|5|e66|e66||": "r66",
   "ee12|334|456|45|6|e6|e|": "r45",
   "ee12|223|4|556|566|e|e|": "r58",
   "e112|e3|e45|466|56|e6||": "r48",
   "ee12|233|34|5|666|ee6||": "r1*r13",
   "ee12|e23|44|555|66|6|e|": "r1*r13",
   "ee12|ee3|345|46|56|66||": "r1*r2*r6",
   "e112|33|e45|46|56|e6|e|": "r81",
   "ee12|234|35|ee|566|66||": "r1*r2*r5",
   "ee12|e34|556|456|66|e||": "r55",
   "ee12|e33|456|45|e6|66||": "r58",
   "ee12|e33|e44|55|66|66||": "r92",
   "e112|e3|334|5|e66|e66||": "r84",
   "e123|e45|e46|e56|56|6||": "r18",
   "ee12|334|355|5|e66|6|e|": "r59",
   "e112|e3|345|46|56|e6|e|": "r40",
   "ee12|345|346|e4|5|66|e|": "r44",
   "ee12|233|45|e4|56|66|e|": "r78",
   "ee12|e34|335|6|566|e6||": "r54",
   "ee12|e34|555|456|66||e|": "r1*r10",
   "ee12|234|35|44|6|e66|e|": "r58",
   "ee12|334|345|5|e6|66|e|": "r79",
   "ee12|e23|45|666|e55|6||": "r1*r10",
   "ee12|234|34|e5|e6|666||": "r1*r2*r3",
   "ee12|e34|345|45|6|66|e|": "r45",
   "e112|e3|e45|446|e|666||": "r1*r10",
   "ee12|e23|45|e46|56|66||": "r80",
   "ee12|e34|355|56|666|e||": "r1*r11",
   "e112|34|e35|46|e6|e66||": "r52",
   "e112|34|e35|66|e55|6|e|": "r24",
   "e112|34|e35|e6|566|e6||": "r51",
   "e123|e24|55|e46|e6|66||": "r81",
   "ee12|e34|e56|445|6|66||": "r60",
   "ee12|233|45|e4|e6|666||": "r1*r12",
   "ee12|e23|34|55|566|6|e|": "r58",
   "e123|e23|e4|56|e56|66||": "r3*r5",
   "ee12|333|456|4|e5|66|e|": "r1*r10",
   "ee12|334|355|6|556||ee|": "r66",
   "e112|23|e4|e56|e56|66||": "r58",
   "ee12|233|34|5|566|e6|e|": "r80",
   "ee12|334|455|46|e|66|e|": "r83",
   "ee12|334|345|e|66|e66||": "r83",
   "ee12|e34|335|e|566|66||": "r1*r2*r6",
   "ee12|334|345|4|6|e66|e|": "r58",
   "ee12|e33|445|e6|56|66||": "r1*r3**2",
   "ee12|334|356|e|556|6|e|": "r48",
   "ee12|233|45|e6|e56|66||": "r78",
   "e112|34|356|e5|e56|6|e|": "r36",
   "e112|e3|e45|446|6|e66||": "r58",
   "ee12|e34|356|56|556||e|": "r45",
   "ee12|334|456|55|66|e|e|": "r83",
   "ee12|334|556|e6|556||e|": "r85",
   "ee12|233|44|e5|66|e66||": "r88",
   "ee12|334|355|e|566|6|e|": "r58",
   "ee12|233|45|e6|556|6|e|": "r62",
   "ee12|223|4|e56|e56|66||": "r59",
   "ee12|e34|345|56|66|e6||": "r45",
   "ee12|e33|444|55|6|66|e|": "r1*r9",
   "ee12|e33|345|6|556|6|e|": "r59",
   "ee12|345|345|45|6|6|ee|": "r56",
   "e112|e3|e34|45|e6|666||": "r1*r10",
   "ee12|e23|45|446|e|666||": "r1*r10",
   "ee12|e23|45|466|56|e6||": "r48",
   "ee12|333|445|5|e6|66|e|": "r1*r12",
   "ee12|223|4|e45|e6|666||": "r1*r11",
   "ee12|334|345|6|e5|66|e|": "r24",
   "e112|e3|345|46|e5|66|e|": "r45",
   "ee12|e23|44|456|5|66|e|": "r80",
   "ee12|334|455|46|5|6|ee|": "r84",
   "ee12|e34|356|44|5|66|e|": "r55",
   "ee12|334|556|55|e66||e|": "r71",
   "ee12|e34|e56|456|56|6||": "r3*r5",
   "ee12|234|35|66|e55|6|e|": "r53",
   "ee12|223|4|456|56|e6|e|": "r3*r5",
   "ee12|334|455|e6|e6|66||": "r83",
   "e112|34|e34|56|56|e6|e|": "r2**2*r3",
   "ee12|e33|e44|56|56|66||": "r72",
   "ee12|333|445|6|e6|e66||": "r1*r10",
   "ee12|e33|456|44|5|66|e|": "r68",
   "ee12|e34|356|56|e56|6||": "r3*r6",
   "ee12|e23|34|56|556|6|e|": "r48",
   "ee12|334|455|e6|66|e6||": "r75",
   "ee12|e34|335|6|556|6|e|": "r48",
   "ee12|e34|335|5|666|e6||": "r1*r10",
   "ee12|e23|34|55|666|e6||": "r1*r10",
   "ee12|e34|556|446|6|e6||": "r60",
   "ee12|234|35|46|56|e6|e|": "r43",
   "ee12|e34|e34|45|6|666||": "r1*r11",
   "ee12|e34|556|e44|6|66||": "r1*r2*r6",
   "ee12|e33|444|e5|6|666||": "r1**2*r3",
   "e112|23|e4|e45|56|66|e|": "r48",
   "e112|34|e56|445|6|e6|e|": "r3*r5",
   "ee12|334|556|e5|e66|6||": "r58",
   "e123|e24|35|e6|566|e6||": "r38",
   "ee12|334|345|6|e6|e66||": "r24",
   "ee12|e34|556|e56|566|||": "r48",
   "ee12|e23|34|e5|566|66||": "r1*r2*r6",
   "ee12|e34|e56|555|666|||": "r1**2*r3",
   "e112|33|456|e4|56|e6|e|": "r3*r5",
   "ee12|334|355|6|e66|e6||": "r57",
   "ee12|e33|445|46|e|666||": "r1*r11",
   "e112|34|e35|e6|556|6|e|": "r45",
   "ee12|e34|345|e4|6|666||": "r1*r10",
   "ee12|345|346|ee|56|66||": "r86",
   "e123|e24|56|e45|e6|66||": "r40",
   "ee12|e23|44|556|66|e6||": "r68",
   "ee12|ee3|344|45|6|666||": "r1**2*r2**2",
   "e112|e3|445|456|6|e6|e|": "r45",
   "ee12|234|35|46|e6|e66||": "r46",
   "ee12|e33|e45|45|66|66||": "r69",
   "ee12|e33|445|e4|6|666||": "r1**2*r3",
   "ee12|233|44|45|6|e66|e|": "r62",
   "ee12|334|556|e5|566||e|": "r54",
   "e112|34|356|e5|e66|e6||": "r44",
   "ee12|ee3|445|466|5|66||": "r1*r2*r5",
   "e112|33|e45|e4|e6|666||": "r1*r13",
   "ee12|ee3|445|456|6|66||": "r1*r2*r6",
   "e123|e45|e46|456|5|6|e|": "r34",
   "ee12|e33|345|6|e56|66||": "r58",
   "e123|e24|56|445|6|e6|e|": "r37",
   "e112|34|e56|e56|556||e|": "r44",
   "ee12|e23|34|45|66|e66||": "r83",
   "ee12|234|35|46|ee|666||": "r1*r13",
   "ee12|334|556|56|e56||e|": "r24",
   "ee12|e34|335|5|566|6|e|": "r55",
   "e112|34|e35|66|e56|e6||": "r46",
   "ee12|334|556|e4|56|6|e|": "r55",
   "e112|e3|e34|56|556|6|e|": "r48",
   "e112|23|44|e55|e6|66|e|": "r65",
   "ee12|e23|44|455|6|66|e|": "r86",
   "e112|34|e34|55|66|e6|e|": "r77",
   "ee12|234|35|e4|56|66|e|": "r45",
   "ee12|e33|345|4|e6|666||": "r1*r11",
   "e112|e3|445|466|e|e66||": "r83",
   "ee12|e33|e45|66|556|6||": "r72",
   "ee12|e34|355|56|566||e|": "r48",
   "ee12|e34|356|45|66|e6||": "r51",
   "ee12|e34|355|44|6|66|e|": "r84",
   "ee12|334|556|e4|e6|66||": "r1*r2*r6",
   "e112|34|555|e46|e6|6|e|": "r1*r2*r3",
   "ee12|234|35|46|55|6|ee|": "r82",
   "e112|23|45|e46|e5|66|e|": "r51",
   "ee12|334|345|5|66|e6|e|": "r77",
   "ee12|e34|556|e45|66|6||": "r58",
   "ee12|234|56|e56|556||e|": "r44",
   "ee12|334|345|6|55|6|ee|": "r83",
   "ee12|345|346|45|5|6|ee|": "r3*r5",
   "e112|23|34|56|e56|e6|e|": "r3*r6",
   "ee12|e34|e56|455|66|6||": "r62",
   "e123|e24|56|e56|556||e|": "r36",
   "e123|e24|35|e6|e56|66||": "r40",
   "ee12|e34|e35|44|6|666||": "r1*r11",
   "ee12|234|35|46|66|ee6||": "r83",
   "ee12|e34|356|45|e6|66||": "r48",
   "ee12|334|456|56|55||ee|": "r84",
   "ee12|e34|555|e46|66|6||": "r1*r10",
   "ee12|e23|45|446|5|66|e|": "r78",
   "ee12|e34|555|e66|566|||": "r1*r13",
   "ee12|334|556|46|e5|6|e|": "r48",
   "ee12|233|44|e5|56|66|e|": "r62",
   "ee12|e23|45|456|56|6|e|": "r3*r6",
   "ee12|e23|44|556|56|6|e|": "r80",
   "e112|34|e35|56|566|e|e|": "r44",
   "e112|34|e35|56|e66|e6||": "r46",
   "ee12|334|345|6|66|ee6||": "r83",
   "ee12|334|556|e5|666|e||": "r1*r12",
   "ee12|223|4|e56|556|6|e|": "r58",
   "ee12|e34|355|46|56|6|e|": "r45",
   "ee12|e33|456|45|56|6|e|": "r3*r5",
   "ee12|345|346|e5|66|e6||": "r45",
   "e123|456|456|456|e|e|e|": "r2*r3",
   "ee12|e34|356|e5|566|6||": "r48",
   "e112|e3|e45|e46|56|66||": "r80",
   "e112|23|e4|556|566|e|e|": "r48",
   "e112|e3|e34|55|566|6|e|": "r58",
   "e112|e3|444|556|6|e6|e|": "r1*r10",
   "ee12|234|34|56|56|e6|e|": "r50",
   "e112|23|e4|556|e56|6|e|": "r48",
   "e112|34|335|6|e56|e6|e|": "r3*r6",
   "e112|23|e4|455|66|e6|e|": "r78",
   "e112|e3|e44|e55|66|66||": "r90",
   "ee12|e23|44|e56|56|66||": "r68",
   "e112|23|e4|455|e6|66|e|": "r83",
   "ee12|334|456|e5|56|6|e|": "r3*r6",
   "ee12|334|456|56|ee|66||": "r69",
   "ee12|234|35|e6|556|6|e|": "r51",
   "ee12|e23|34|56|e56|66||": "r58",
   "ee12|223|4|455|56|6|ee|": "r68",
   "e112|23|45|456|e6|e6|e|": "r38",
   "ee12|e34|355|66|e56|6||": "r78",
   "e112|e3|e34|55|666|e6||": "r1*r10",
   "ee12|333|444|5|6|e66|e|": "r1**2*r3",
   "e112|34|e56|455|66|e|e|": "r30",
   "ee12|e33|344|5|e6|666||": "r1*r11",
   "ee12|234|56|e44|5|66|e|": "r54",
   "e112|e3|344|56|e5|66|e|": "r54",
   "ee12|ee3|344|55|66|66||": "r1*r2*r7",
   "ee12|345|346|e5|56|6|e|": "r36",
   "e112|34|e56|e56|e56|6||": "r2**2*r3",
   "e112|23|45|e45|e6|66|e|": "r45",
   "ee12|234|35|e6|e56|66||": "r45",
   "ee12|e23|e4|556|566|6||": "r1*r3**2",
   "e112|e3|e34|e5|566|66||": "r1*r2*r6",
   "e112|33|445|e5|e6|66|e|": "r85",
   "e123|e24|35|66|e56|e6||": "r43",
   "e112|34|e35|46|56|e6|e|": "r43",
   "e112|34|356|e5|566|e|e|": "r42",
   "e112|34|556|e56|e56||e|": "r42",
   "ee12|234|56|e55|566||e|": "r24",
   "e123|e23|45|46|56|e6|e|": "r18",
   "e112|23|45|e46|e6|e66||": "r45",
   "ee12|334|356|5|ee6|66||": "r86",
   "e112|34|e55|e46|56|6|e|": "r76",
   "ee12|e33|e45|46|56|66||": "r68",
   "e112|34|e34|e5|e6|666||": "r1*r2*r3",
   "ee12|334|345|e|56|66|e|": "r48",
   "ee12|234|56|e45|56|6|e|": "r41",
   "ee12|334|556|66|e55||e|": "r66",
   "e112|34|e35|e6|e56|66||": "r45",
   "e112|33|445|e6|e6|e66||": "r83",
   "ee12|334|456|e5|66|e6||": "r78",
   "e112|34|e35|e5|666|e6||": "r1*r2*r3",
   "e112|23|45|466|e5|e6|e|": "r45",
   "e112|34|345|e6|56|e6|e|": "r36",
   "e112|23|45|e66|e56|e6||": "r51",
   "ee12|e34|556|456|56||e|": "r51",
   "e112|33|e45|66|e56|e6||": "r3*r7",
   "ee12|334|356|e|e56|66||": "r58",
   "ee12|234|56|ee5|566|6||": "r83",
   "e112|23|44|e56|56|e6|e|": "r3*r5",
   "e123|e24|56|e56|e56|6||": "r18",
   "ee12|334|335||e66|e66||": "r67",
   "ee12|234|34|55|66|e6|e|": "r30",
   "e112|e3|e45|456|56|6|e|": "r3*r6",
   "ee12|e23|44|e55|66|66||": "r90",
   "ee12|334|356|5|556||ee|": "r85",
   "e112|e3|e45|446|5|66|e|": "r78",
   "ee12|e34|356|55|666|e||": "r1*r10",
   "ee12|e34|335|6|e56|66||": "r55",
   "ee12|e23|44|556|e6|66||": "r1*r2*r6",
   "e112|33|456|45|e6|e6|e|": "r56",
   "e112|23|e4|e55|566|6|e|": "r58",
   "e112|e3|e34|45|56|66|e|": "r48",
   "ee12|e34|345|e5|66|66||": "r83",
   "e112|34|345|e6|e6|e66||": "r42",
   "ee12|e34|334|5|66|e66||": "r83",
   "e112|34|356|45|e6|e6|e|": "r41",
   "e112|33|e45|46|e6|e66||": "r63",
   "ee12|345|346|e4|e|666||": "r1*r2*r3",
   "e123|e24|35|e4|e6|666||": "r1*r8",
   "ee12|ee3|445|446||666||": "r1**2*r2**2",
   "ee12|223|4|e55|e66|66||": "r71",
   "e112|33|e44|e5|66|e66||": "r89",
   "ee12|233|45|66|e55|6|e|": "r64",
   "ee12|e34|355|46|e6|66||": "r83",
   "ee12|e33|445|66|e5|66||": "r72",
   "ee12|e34|334|5|56|66|e|": "r48",
   "e112|34|e35|45|66|e6|e|": "r76",
   "ee12|333|445|6|55|6|ee|": "r1**2*r2**2",
   "e112|23|e4|e55|e66|66||": "r70",
   "ee12|334|355|4|e6|66|e|": "r64",
   "ee12|334|355|e|e66|66||": "r70",
   "ee12|e33|456|e4|56|66||": "r1*r3**2",
   "ee12|223|4|e45|56|66|e|": "r58",
   "e112|e3|e44|456|5|66|e|": "r80",
   "ee12|e34|e35|66|556|6||": "r59",
   "e112|e3|445|566|e6|e6||": "r48",
   "e112|e3|e45|666|e55|6||": "r1*r10",
   "ee12|234|35|66|ee5|66||": "r66",
   "ee12|e34|e34|55|66|66||": "r71",
   "ee12|e34|e35|45|66|66||": "r65",
   "ee12|233|44|56|56|e6|e|": "r30",
   "ee12|345|346|e5|e6|66||": "r44",
   "e112|e3|e34|55|e66|66||": "r70",
   "ee12|345|345|e6|e6|66||": "r42",
   "ee12|334|345|6|56|e6|e|": "r44",
   "ee12|e33|345|4|66|e66||": "r65",
   "ee12|233|45|45|56|6|ee|": "r63",
   "ee12|e33|344|5|66|e66||": "r71",
   "ee12|e33|445|66|56|e6||": "r68",
   "e123|e24|e5|e45|66|66||": "r3*r5",
   "ee12|233|45|46|55|6|ee|": "r64",
   "ee12|334|356|5|e66|e6||": "r53",
   "ee12|e34|345|46|6|e66||": "r51",
   "ee12|e34|355|46|66|e6||": "r55",
   "ee12|334|356|4|56|e6|e|": "r51",
   "ee12|e33|445|46|6|e66||": "r62",
   "ee12|334|356|4|e5|66|e|": "r54",
   "ee12|e34|555|e56|666|||": "r1**2*r3",
   "ee12|334|556|e6|566|e||": "r49",
   "ee12|333|445|6|66|ee6||": "r1*r14",
   "e112|33|345|6|e56|e6|e|": "r3*r5",
   "ee12|e34|335|4|56|66|e|": "r54",
   "ee12|e33|e45|44|6|666||": "r1*r9",
   "ee12|334|355|6|566|e|e|": "r54",
   "e112|e3|e44|455|6|66|e|": "r86",
   "e112|34|e35|45|e6|66|e|": "r73",
   "e123|e45|e45|466|e|66||": "r56",
   "ee12|234|56|e55|e66|6||": "r77",
   "ee12|234|34|45|6|e66|e|": "r3*r5",
   "ee12|e34|334|5|e6|666||": "r1*r10",
   "ee12|234|35|e4|66|e66||": "r82",
   "e123|e45|e45|e46|6|66||": "r2**2*r3",
   "e112|e3|e44|556|e6|66||": "r1*r2*r6",
   "ee12|334|456|e4|5|66|e|": "r55",
   "e112|e3|e45|445|6|66|e|": "r48",
   "ee12|233|45|e4|66|e66||": "r85",
   "e112|23|e4|556|e66|e6||": "r58",
   "ee12|e34|356|55|e66|6||": "r80",
   "ee12|233|45|46|56|e6|e|": "r76",
   "ee12|334|456|56|56|e|e|": "r42",
   "e112|34|e56|456|56|e|e|": "r50",
   "ee12|e23|45|446|6|e66||": "r58",
   "ee12|e23|45|456|e6|66||": "r48",
   "ee12|223|4|ee5|566|66||": "r1*r2*r5",
   "e123|e23|44|56|56|e6|e|": "r50",
   "e112|e3|345|45|e6|66|e|": "r51",
   "e112|e3|e34|56|e56|66||": "r58",
   "ee12|233|45|46|e6|e66||": "r79",
   "e112|e3|334|5|e56|66|e|": "r55",
   "ee12|334|556|46|55||ee|": "r69",
   "ee12|223|4|e55|666|e6||": "r1*r11",
   "ee12|334|355|6|e56|6|e|": "r53",
   "ee12|e34|555|446|6|6|e|": "r1*r11",
   "ee12|e33|445|46|5|66|e|": "r59",
   "e123|e24|56|e45|66|e6||": "r41",
   "ee12|e34|556|e55|666|||": "r1*r13",
   "ee12|333|445|4|6|e66|e|": "r1*r11",
   "ee12|e23|44|e45|6|666||": "r1*r13",
   "ee12|334|355|4|66|e6|e|": "r62",
   "e112|23|e4|e56|556|6|e|": "r48",
   "e112|33|e44|56|56|e6|e|": "r63",
   "e112|33|445|56|e6|e6|e|": "r82",
   "e112|34|e56|e45|56|6|e|": "r43",
   "ee12|334|556|e4|66|e6||": "r60",
   "ee12|e23|e4|455|66|66||": "r1*r3*r4",
   "e112|34|e56|e45|e6|66||": "r51",
   "ee12|233|45|45|e6|66|e|": "r79",
   "ee12|e23|34|45|56|66|e|": "r48",
   "e123|e23|e4|56|556|6|e|": "r3*r6",
   "ee12|e23|45|466|e5|66||": "r83",
   "ee12|ee3|445|566|56|6||": "r1*r2*r6",
   "e112|34|e35|66|556|e|e|": "r53",
   "ee12|e33|444|56|5|66|e|": "r1*r11",
   "e112|e3|e44|e56|56|66||": "r68",
   "ee12|e34|e34|56|56|66||": "r59",
   "ee12|e23|45|e44|6|666||": "r1*r13",
   "e123|e24|35|46|56|e6|e|": "r34",
   "e112|23|e4|456|56|e6|e|": "r3*r6",
   "e112|23|45|e46|56|e6|e|": "r40",
   "ee12|e23|e4|445|6|666||": "r1**2*r3",
   "e112|23|e4|e45|e6|666||": "r1*r10",
   "e123|e23|e4|e5|566|66||": "r1*r2*r3",
   "ee12|334|455|e4|6|66|e|": "r84",
   "e112|23|34|e5|e66|e66||": "r83",
   "ee12|e34|356|55|566||e|": "r54",
   "e123|e24|e5|456|56|6|e|": "r3**2",
   "ee12|233|34|5|e56|66|e|": "r80",
   "ee12|223|4|445|6|e66|e|": "r60",
   "ee12|233|45|46|e5|66|e|": "r77",
   "ee12|e34|e56|556|566|||": "r58",
   "e112|e3|e45|456|e6|66||": "r48",
   "ee12|233|44|e5|e6|666||": "r1*r12",
   "e112|34|e35|46|e5|66|e|": "r44",
   "ee12|e33|345|4|56|66|e|": "r58",
   "ee12|234|56|e45|66|e6||": "r73",
   "ee12|e33|445|56|56|6|e|": "r58",
   "ee12|e34|355|e5|666|6||": "r1*r10",
   "e112|34|355|e6|e66|e6||": "r24",
   "e123|e45|e45|466|6|e6||": "r38",
   "ee12|e34|355|e6|566|6||": "r58",
   "e112|e3|e45|466|55|6|e|": "r55",
   "ee12|e34|345|e6|56|66||": "r48",
   "ee12|345|345|e4|6|66|e|": "r42",
   "e123|e24|35|56|e56|6|e|": "r35",
   "ee12|334|356|5|566|e|e|": "r24",
   "ee12|e23|45|e45|66|66||": "r86",
   "ee12|345|346|44||e66|e|": "r59",
   "e112|34|e35|56|e56|6|e|": "r41",
   "ee12|233|44|55|66|e6|e|": "r87",
   "ee12|ee3|334|5|566|66||": "r1**2*r2**2",
   "e112|e3|e44|556|56|6|e|": "r80",
   "e112|e3|445|456|e|66|e|": "r48",
   "ee12|333|445|5|66|e6|e|": "r1*r13",
   "ee12|e23|e4|456|56|66||": "r1*r3**2",
   "e112|34|356|e4|56|e6|e|": "r2**2*r3",
   "e112|34|e56|e55|e66|6||": "r77",
   "e123|e45|e45|456|6|6|e|": "r33",
   "ee12|e34|556|445|6|6|e|": "r55",
   "e112|34|e35|e4|e6|666||": "r1*r2*r3",
   "ee12|334|356|5|e56|6|e|": "r46",
   "ee12|234|35|e4|e6|666||": "r1*r2*r3",
   "ee12|e34|355|66|556||e|": "r83",
   "e112|23|e4|e45|66|e66||": "r83",
   "ee12|234|34|e5|66|e66||": "r63",
   "e112|e3|e44|555|66|6|e|": "r1*r13",
   "ee12|234|56|e55|666|e||": "r1*r11",
   "e112|33|e45|e6|e56|66||": "r83",
   "ee12|334|344|5|6|e66|e|": "r58",
   "ee12|233|34|5|e66|e66||": "r86",
   "e112|e3|e45|e45|66|66||": "r86",
   "ee12|e34|355|56|e66|6||": "r80",
   "ee12|334|455|56|e6|6|e|": "r77",
   "e123|e24|34|e5|e6|666||": "r1*r8",
   "ee12|223|4|e55|566|6|e|": "r59",
   "ee12|e23|45|445|6|66|e|": "r48",
   "e112|e3|e45|466|e5|66||": "r83",
   "ee12|334|455|e5|66|6|e|": "r74",
   "ee12|234|35|45|56|6|ee|": "r81",
   "ee12|e34|556|455|66||e|": "r64",
   "e112|34|e55|e45|66|6|e|": "r79",
   "ee12|e34|355|e4|66|66||": "r70",
   "ee12|e33|445|66|55|6|e|": "r1*r2*r5",
   "e112|33|e45|45|e6|66|e|": "r82",
   "e112|e3|e34|45|66|e66||": "r83",
   "ee12|e23|34|45|e6|666||": "r1*r10",
   "ee12|233|45|46|ee|666||": "r1*r13",
   "ee12|223|4|e45|66|e66||": "r65",
   "ee12|234|56|e45|e6|66||": "r51",
   "ee12|345|346|56|56|e|e|": "r37",
   "ee12|e34|345|55|66|6|e|": "r48",
   "ee12|333|445|6|e5|66|e|": "r1*r11",
   "ee12|e33|445|55|66|6|e|": "r69",
   "ee12|234|35|66|e56|e6||": "r52",
   "ee12|e23|34|55|e66|66||": "r70",
   "ee12|e23|45|466|55|6|e|": "r55",
   "e112|33|e45|e6|556|6|e|": "r65",
   "ee12|234|56|ee4|56|66||": "r65",
   "e123|e24|56|456|56|e|e|": "r33",
   "e112|e3|344|56|56|e6|e|": "r51",
   "ee12|e34|356|e4|56|66||": "r58",
   "ee12|ee3|444|556|6|66||": "r1**2*r2**2",
   "ee12|e34|e35|46|56|66||": "r58",
   "ee12|334|456|45|e|66|e|": "r48",
   "e112|e3|344|55|e6|66|e|": "r64",
   "ee12|223|4|556|556||ee|": "r69",
   "e112|23|e4|456|e5|66|e|": "r48",
   "e112|34|355|e6|e56|6|e|": "r44",
   "ee12|233|45|66|ee5|66||": "r89",
   "e112|e3|445|566|e5|6|e|": "r55",
   "e123|e24|56|e45|56|6|e|": "r34",
   "ee12|334|456|56|e5|6|e|": "r44",
   'e112|e2|33|45|e55|e|': "r27",
   'e112|e2|34|e44|e|': "r11",
   'e112|e2|34|e45|55|e|': "r24",
   'e112|e2|34|e55|e55||': "r26",
   'ee11|22|33|44|55|ee|': "r93",
   'ee11|22|33|44|ee|': "r15",

   'ee11|22|33|45|e55|e|': "r32",
   'ee11|22|33|ee|': "r7",
   'ee11|22|34|445|5|ee|': "r32",
   'ee11|22|34|e44|e|': "r9",
   'ee11|22|34|e45|55|e|': "r28",
   'ee11|22|34|e55|e55||': "r29",
   'ee11|22|34|ee5|555||': "r1*r7",
   'ee11|22|ee|': "r4",
   'ee11|23|334|4|55|ee|': "r32",
   'ee11|23|334|4|ee|': "r9",
   'ee11|23|334|5|e55|e|': "r27",
   'ee11|23|344|45|5|ee|': "r28",
   'ee11|23|344|55|e5|e|': "r30",
   'ee11|23|345|45|e5|e|': "r3*r4",
   'ee11|23|444|455||ee|': "r1*r7",
   'ee11|23|445|445||ee|': "r29",
   'ee11|23|445|455|e|e|': "r25",
   'ee11|23|e33|e|': 'r5',
   'ee11|23|e34|44|e|': "r13",
   "ee11|23|e34|45|55|e|": 'r25',

   "ee11|23|e34|55|e55||": "r31",
   "ee11|23|e34|e5|555||": "r1*r5",
   "ee11|23|e44|455|5|e|": "r26",
   "ee11|23|e44|555|e5||": "r1*r5",
   "ee11|23|e44|e44||": "r14",
   "ee11|23|e44|e55|55||": "r29",
   "ee11|23|e45|445|5|e|": "r25",
   "ee11|23|e45|e45|55||": "r26",
   "ee11|23|ee4|444||": "r1*r4",
   "ee11|23|ee4|455|55||": "r1*r2*r4",
   "ee12|223|3|45|e55|e|": "r27",
   "ee12|333|345||e55|e|": "r1*r5",
    }
